<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFilmsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('films', function (Blueprint $table) {
            $table->increments('id');
            $table->string('code',20);
            $table->string('name',20);
            $table->string('display_name',20);
            $table->string('languages',30)->nullable();
            $table->string('image_types',50)->nullable();
            $table->string('frame_types',50)->nullable();
            $table->string('version',20)->nullable();
            $table->integer('duration')->nullable();
            $table->timestamp('publish_date')->nullable();
            $table->timestamp('publish_end_date')->nullable();
            $table->string('publisher',30)->nullable();
            $table->string('producer',30)->nullable();
            $table->string('director',30)->nullable();
            $table->text('cast')->nullable();
            $table->string('introduction',255)->nullable();
            $table->integer('lowest_price')->nullable();
            $table->integer('share_proportion')->nullable();
            $table->string('remark',200)->nullable();
            $table->integer('status')->default(1);
            $table->integer('project_id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('films');
    }
}
